1. Field of the Invention
The present invention relates to a storage system and a data guarantee method.
2. Description of the Related Art
A storage system includes, for example, a storage device and a storage controller for controlling the storage device. As the storage device, a hard disk drive is used widely. In a company, data to be stored for a long time is increased everyday. Thus, the number of hard disk drives mounted in the storage device is also increased. The hard disk drive is large in an outer diameter size or in a weight, and also has high power consumption comparing with a memory device such as a semiconductor memory.
Recently, a flash memory device is attracting attention instead of the hard disk drive. The flash memory device has lower power consumption than the hard disk drive and the speed for reading data is also high. Further, the flash memory device can be manufactured in a reduced size because there is no mechanical moving component, so that the mechanical trouble is hard to occur.
When new data is tried to be written in the flash memory device, data having been stored in a block is erased all at once in order to store new data in the erased block. However, since a period of time required for erasing data in a block is longer than that of writing data, writing performance is decreased. In addition, there is a limitation on the number of times erasing the block. When the blocks are erased above the limitation, reliability thereof is deteriorated, so that it can be used no longer.
Here, the flash memory device manages the received data by converting a logical address thereof into a physical address in the flash memory, and writes the received data in an empty block. In this way, without erasing data in the block, the received data can be written, so that the responsiveness to writing can be increased. Further, it is possible to prevent a typical block from being intensively used (erased), to control each block in the flash memory to be uniformly used, and to lengthen the lifespan of the flash memory device by managing a correspondence between logical addresses and physical addresses.
The above-mentioned address conversion process is referred to, for example, as a wear leveling process and performed in the flash memory device. If a correspondence relationship between the logical address and the physical address is managed incorrectly, desired data cannot be read out and reliability of a storage system is reduced. For this reason, a technology in that a protection code for specifying address information of writing page is generated and is combined with target writing data so as to be written in the flash memory is disclosed (Patent Document 1). According to the prior art, it is possible to determine whether or not data read from the flash memory is correct by comparing address information which is specified from the protection code added to data read from the flash memory and a logical address of data of a read target.    [Patent Document 1] Japanese Unexamined Patent Application Publication No. 2008-9635